<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
    <script src="../scripts/jquery.min.js"></script>
    <script src="../js/jquery-form.js"></script>

    <style type="text/css">
        .for_img_upload{

        }
    </style>

    <title>用户信息</title>
    <style>
        body{padding: 10px;}
        .change_size{
            height: 100px;
        }
    </style>
</head>

<body>

<input type="hidden" id="flag_manager" value=<%=session.getAttribute("flag_manager")%> />


<form  class="layui-form layui-form-pane1" id="subform" method="post">

    <input type="hidden" name="user_id" id="user_id" value=${param.user_id} />

    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-block">
            <input type="text" id="user_name" name="user_name" readonly="readonly" lay-verify="required|title"  placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">昵称</label>
        <div class="layui-input-block">
            <input type="text" id="user_nickname" name="user_nickname" readonly="readonly" lay-verify="required|title"  placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">头像</label>
        <div class="layui-input-block">
            <img id="user_img" width="100" height="100" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <input type="text" id="sex" name="user_name" readonly="readonly" lay-verify="required|title"  placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>


</form>


<script>
    //加载layui信息
    layui.use('form', function(){
        var form = layui.form;
        //layui日期选择
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#createTime', //指定元素
                value: new Date()
            });
        });
    });

    var layer;
    layui.use('layer', function(){
        layer = layui.layer;

    })

    window.onload=function (){
        $.ajax({
            url:"${pageContext.request.contextPath}/comment/comment_table_user_info_init.do",
            data:{
                "user_id":$('#user_id').val()
            },
            success:function (data,status){
                if(status=="success"){
                    $("#user_name").val(data.user_name);
                    $("#user_nickname").val(data.user_nickname);
                    $("#sex").val(data.sex);
                    var path="${pageContext.request.contextPath}/img_artificial/"+"user_img/"+data.user_img;
                    $("#user_img").attr("src",path);
                }
            }
        })
    }


</script>

</body>
</html>
